Ceon Tax Declaration

Installation

Installation of the module has been made as simple as possible and shouldn't take long for any stores which have not already modified any of the template files or core files which this module has to modify.

If any of the template files or core files this distribution have already been modified (because of another third party module being installed) then the changes for the respective files should be applied manually by copying across the appropriate sections of code required for the Tax Declaration module. These sections are clearly marked (with “// BEGIN” and “// END” comments) within the sample files provided in this distribution.

Requirements

Installation Overview

  1. Copy the new files from the distribution into the Zen Cart installation.
  2. Copy the updated template files and icon from the distribution into the Zen Cart installation or modify their equivalents in the store's existing template files.
  3. Copy the override module files from the distribution into the Zen Cart installation.
  4. Copy the override language definition files from the distribution into the Zen Cart installation.
  5. Copy the updated core files from the distribution into the Zen Cart installation or modify the respective core files.
  6. Modify the store's database tables by running the provided SQL script.
  7. Change the text used by the module.
  8. Set up the Products.

Installation Steps

  1. New Files

    These are the new files which make up this module. Copy them all into their respective folders in the Zen Cart installation.

    New files for the Admin directory

    Most Zen Cart stores have their admin directory renamed from the default of “admin”.

    Copy all of the folders and files from the files/admin folder into the store's “admin” directory, whatever it is called.

    The files are already in the correct directory structure, so a single drag-and-drop of the folders/files in the files/admin folder into the “admin” directory for the store will put the files in the correct locations.

    Please do not copy the files individually - there's simply no need - doing so often results in files being missed out!

    • admin/includes/extra_datafiles/tax_declaration_filenames.php
    • admin/includes/languages/english/extra_definitions/tax_declaration.php
    • admin/includes/languages/english/images/buttons/button_tax_declaration.gif
    • admin/includes/languages/english/tax_declaration.php
    • admin/tax_declaration.php
    New files for the main store directory

    Copy the includes folder from the files folder into the store's main directory.

    The files are already in the correct directory structure, so a single drag-and-drop of the folder into the root directory for the store will put the files in the correct locations.

    Please do not copy the files individually - there's simply no need - doing so often results in files being missed out!

    Warning: Be careful NOT to copy the files from the files/includes folder into the store's admin/includes directory, they go in the includes directory which is alongside, not inside the store's admin directory.

    • includes/auto_loaders/config.tax_declarationCheckout.php
    • includes/auto_loaders/config.tax_declarationProductInfo.php
    • includes/classes/observers/class.tax_declarationCheckout.php
    • includes/classes/observers/class.tax_declarationProductInfo.php
    • includes/languages/english/extra_definitions/tax_declaration.php
  2. Updated Template Files For Zen Cart 1.3.x

    Many of the standard Zen Cart template files require modifications to work with this module.

    These modifications have been made to “fresh” copies of the template files from a “clean” installation of Zen Cart and are included as sample files in this distribution.

    • If any of these template files haven't already been modified for the store, the sample files included in this distribution can be copied into the store's template directory and will then override the standard versions of the files included in the Zen Cart distribution.

    • If any of these template files have already been modified for the store, then the changes necessary for the Tax Declaration module to function must be made to the store's modified file(s). The changes are clearly marked within the sample files in the distribution and should be easy enough to copy across, especially if a “diff” software package (such as the free WinMerge or the excellent, commercial, Beyond Compare) is used.

      Instructions on how to copy across the modifications necessary for this module - to template files which have previously been modified - can be found in this FAQ.

    An image also needs to be copied into the appropriate folder for your template.

    The sample template files can be found within the template_override_files folder in the distribution. They are:

    • includes/templates/STORE-TEMPLATE/templates/tpl_modules_products_all_listing.php
    • includes/templates/STORE-TEMPLATE/templates/tpl_modules_products_featured_listing.php
    • includes/templates/STORE-TEMPLATE/templates/tpl_modules_products_new_listing.php
    • includes/templates/STORE-TEMPLATE/templates/tpl_account_history_info_default.php
    • includes/templates/STORE-TEMPLATE/templates/tpl_checkout_confirmation_default.php
    • includes/templates/STORE-TEMPLATE/templates/tpl_checkout_payment_default.php
    • includes/templates/STORE-TEMPLATE/templates/tpl_checkout_shipping_default.php
    • includes/templates/STORE-TEMPLATE/templates/tpl_product_info_display.php
    • includes/templates/STORE-TEMPLATE/templates/tpl_shopping_cart_default.php
    • includes/templates/STORE-TEMPLATE/images/icons/tick.gif
  3. Override Core Module Files

    Some of the store's module files have to be “overridden” so that their code is run instead of the standard code for the cart, to add the Tax Declaration column to product listings.

    The standard code can be overridden simply by copying the files into the modules directory for the store's template.

    • If the store doesn't already have any modified version(s) of these module files, the files included in this distribution can be copied into the store template's modules directory and will then override the standard versions of the files included in the Zen Cart distribution.

    • If the store already has modified version(s) of these module files, then the changes applied for the Tax Declaration module must be added to the store's modified file(s).

    The override module files can be found within the core_override_files folder in the distribution. They are:

    • includes/modules/STORE-TEMPLATE/new_products.php
    • includes/modules/STORE-TEMPLATE/product_listing.php
  4. Override Language Definition Files

    Some of the language definitions have to be overridden so that the additional text needed to provide information about Tax Declarations can be displayed.

    These definitions can be added simply by copying the files into the store's template directory for the appropriate language.

    • If the store doesn't have any modified version(s) of these language definition files, the files included in this distribution can be copied into the store template's languages directory and will then override the standard versions of the files included in the Zen Cart distribution, adding the necessary language definitions for the site.

    • If the store already has modified version(s) of these language definition files, then the definitions necessary for the Tax Declaration module must be added to the store's modified file(s).

    The additional template files can be found within the language_override_files folder in the distribution. They are:

    • includes/languages/english/STORE-TEMPLATE/account_history_info.php
    • includes/languages/english/STORE-TEMPLATE/checkout_confirmation.php
    • includes/languages/english/STORE-TEMPLATE/checkout_payment.php
    • includes/languages/english/STORE-TEMPLATE/checkout_shipping.php
    • includes/languages/english/STORE-TEMPLATE/product_info.php
  5. Updated Core Files For Zen Cart 1.3.x

    A few core Zen Cart files must be updated to work with the Tax Declaration module.

    • It is likely that none of these files have been modified for the store already, in which case the modified files from this distribution, for the version of Zen Cart being used by the store, should simply be copied over the existing version of the files.

    • As with the template files in a previous step, if any of the these core files have already been modified for the store, the changes within the modified sample files included in this distribution must be applied to the previously modified core files.

    The modified core files can be found within the core_modified_files folder in the distribution. A list of the files follows.

    • admin/includes/classes/order.php
    • admin/includes/modules/product/collect_info.php
    • admin/includes/modules/product/preview_info.php
    • admin/includes/modules/copy_to_confirm.php
    • admin/includes/modules/update_product.php
    • admin/orders.php
    • includes/classes/order.php
    • includes/classes/shopping_cart.php
    • includes/index_filters/default_filter.php
    • includes/modules/pages/advanced_search_result/main_template_vars.php
    • includes/modules/pages/featured_products/header_php.php
    • includes/modules/pages/index/main_template_vars.php
    • includes/modules/pages/products_all/header_php.php
    • includes/modules/pages/products_new/header_php.php
    • includes/modules/pages/checkout_payment/header_php.php
    • includes/modules/pages/checkout_shipping/header_php.php
    • includes/modules/pages/checkout_success/header_php.php
    • includes/modules/pages/shopping_cart/header_php.php
  6. Modify the Store's Database Tables

    An SQL script, tax_declaration.sql, is provided with this module to modify the store's database tables to work with this module and to add the various configuration options this module offers.

    • The easiest option is to go to Tools > Install SQL Patches in the Zen Cart Admin, select Browse..., find and select the file tax_declaration.sql on your computer, then click Upload.

    • Or software such as PHPMyAdmin can be used to run the SQL script (Care must be taken to check the name of the tables. If the store uses a prefix for the table names it is essential that this prefix is put in front of the table names).

  7. Change the text used by the module.

    The Tax Declaration requires customisation of some of its text in the language defines, according to the store's needs.

    One thing that every store should update is the store's address for the declaration in its admin language definition file: admin/includes/languages/english/tax_declaration.php - this file should be edited directly.

  8. Set up the Products

    Now all that has to be done is to apply the tax declaration settings for the various products for the store in the Zen Cart Admin.

Back to top